<% content_for :title do %>Add a new product<% end %>

<h1>Add a New Product</h1>

<% if @product.errors.any? %>
	<div class="error_explaination">
		<h2><%= pluralize(@product.errors.count, "error") %> prohibited this product from being added:</h2>

		<ul>
		<% @product.errors.full_messages.each do |msg| %>
			<li><%= msg %></li>
		<% end %>
		</ul>
	</div>
<% end %>

<form action="<%= products_path %>" method="post">
	<input name="authenticity_token" value="<%= form_authenticity_token %>" type="hidden">
	<input type="text" name="product[name]" placeholder="Product Name" />
	<input type="text" name="product[description]" placeholder="Description" />
	<input type="text" name="product[pricing]" placeholder="e.g., 10.50" />
	<input type="submit" value="Add Product" />
</form>

<%= link_to 'Cancel', products_path %>